#include <stdio.h>

int main()
{
    int h = 0, m = 0, k = 0;
	int h2 = 0, m2 = 0;
	scanf("%d:%d %d", &h, &m, &k);
	h2 = (h+((m+k) / 60))%24;
	m2 = (m+k) % 60;
	printf("%02d:%02d", h2, m2);
    return 0;
}
